import { createRouter, createWebHashHistory } from 'vue-router'
import { defineAsyncComponent } from 'vue'
const index = defineAsyncComponent(() => import('../pages/index.vue'))
const login = defineAsyncComponent(() => import('../pages/login.vue'))
const table = defineAsyncComponent(() => import('../pages/table.vue'))
const setting = defineAsyncComponent(() => import('../pages/setting.vue'))
const routes = [
    {
        path: '/',
        component: login
    }, {
        path: '/index',
        component: index
    }, {
        path: '/table',
        component: table,
        query:{
            name:''
        }
    },    {
        path: '/setting',
        component: setting
    },
]
const router = createRouter({
    history: createWebHashHistory(),
    routes
})
export default router